public class game_test
{
  public static void main (String [] argv)
  {
    Player p1 = new Player(1,"Jim", 45, 50, 25, 39);
    Player p3 = new Player(3,"John", 60, 40, 12, 63);
    Player p5 = new Player(5,"Garfield", 43, 66, 36, 39);
    Player p7 = new Player(7,"Digsy", 49, 40, 50, 39);
    Player p9 = new Player(9,"Camembert", 57, 20, 41, 54);
    Player p11 = new Player(11,"Monk", 19, 69, 5, 36);
    Player p13 = new Player(13,"Cup", 43, 55, 36, 15);
    Player p15 = new Player(15,"Bruce", 16, 60, 32, 32);
    Player p17 = new Player(17,"Barney", 21, 40, 15, 50);
    Player p19 = new Player(19,"Chris", 64, 43, 21, 47);
    Player p21 = new Player(21,"Eric", 39, 21, 57, 40);
    Player p23 = new Player(23,"Faz", 42, 12, 61, 43);
    Player p25 = new Player(25,"Alex", 35, 56, 45, 34);

    Player p2 = new Player(2,"Fred", 30, 45, 32, 58);
    Player p4 = new Player(4,"Smitty", 70, 11, 19, 42);
    Player p6 = new Player(6,"Giggs", 67, 36, 10, 21);
    Player p8 = new Player(8,"Frank", 12, 75, 9, 46);
    Player p10 = new Player(10,"Oli", 36, 56, 20, 18);
    Player p12 = new Player(12,"Dogbert", 52, 49, 14, 27);
    Player p14 = new Player(14,"Dobbs", 36, 59, 27, 42);
    Player p16 = new Player(16,"Rob", 56, 30, 15, 49);
    Player p18 = new Player(18,"Jonny", 46, 50, 24, 36);
    Player p20 = new Player(20,"Stu", 65, 37, 18, 29);
    Player p22 = new Player(22,"Tom", 25, 60, 14, 57);
    Player p24 = new Player(24,"Dave", 27, 36, 70, 65);
    Player p26 = new Player(26,"Mayor", 46, 24, 39, 27);

    Player [] home_squad = {p1,p3,p5,p7,p9,p11,p13,p15,p17,p19,p21,p23,p25};
    Player [] away_squad = {p2,p4,p6,p8,p10,p12,p14,p16,p18,p20,p22,p24,p26};

    Team home_team = new Team (1, "team 1", home_squad, new Human ()); 
    home_team.set_formation(Formations.four_four_two());

    Team away_team = new Team (2, "team 2", away_squad, new Computer());
    away_team.set_formation(Formations.four_four_two());

    try{

      home_team.set_position(p1,new PlayingPosition (PlayingPosition.ForwardPos.mid, PlayingPosition.SidePos.left));
      home_team.set_position(p3,new PlayingPosition (PlayingPosition.ForwardPos.forward, PlayingPosition.SidePos.rightcentre));
      home_team.set_position(p5,new PlayingPosition (PlayingPosition.ForwardPos.defender, PlayingPosition.SidePos.right));
      home_team.set_position(p7,new PlayingPosition (PlayingPosition.ForwardPos.mid, PlayingPosition.SidePos.right));
      home_team.set_position(p9,new PlayingPosition (PlayingPosition.ForwardPos.forward, PlayingPosition.SidePos.leftcentre));
      home_team.set_position(p11,new PlayingPosition (PlayingPosition.ForwardPos.defender, PlayingPosition.SidePos.leftcentre));
      home_team.set_position(p13,new PlayingPosition (PlayingPosition.ForwardPos.mid, PlayingPosition.SidePos.rightcentre));
      home_team.set_position(p15,new PlayingPosition (PlayingPosition.ForwardPos.defender, PlayingPosition.SidePos.rightcentre));
      home_team.set_position(p19,new PlayingPosition (PlayingPosition.ForwardPos.mid, PlayingPosition.SidePos.leftcentre));
      home_team.set_position(p23,new PlayingPosition (PlayingPosition.ForwardPos.keeper, PlayingPosition.SidePos.centre));
      home_team.set_position(p25,new PlayingPosition (PlayingPosition.ForwardPos.defender, PlayingPosition.SidePos.left));

      away_team.set_position(p2,new PlayingPosition (PlayingPosition.ForwardPos.mid, PlayingPosition.SidePos.left));
      away_team.set_position(p4,new PlayingPosition (PlayingPosition.ForwardPos.forward, PlayingPosition.SidePos.rightcentre));
      away_team.set_position(p6,new PlayingPosition (PlayingPosition.ForwardPos.defender, PlayingPosition.SidePos.right));
      away_team.set_position(p8,new PlayingPosition (PlayingPosition.ForwardPos.mid, PlayingPosition.SidePos.right));
      away_team.set_position(p10,new PlayingPosition (PlayingPosition.ForwardPos.forward, PlayingPosition.SidePos.leftcentre));
      away_team.set_position(p12,new PlayingPosition (PlayingPosition.ForwardPos.defender, PlayingPosition.SidePos.leftcentre));
      away_team.set_position(p14,new PlayingPosition (PlayingPosition.ForwardPos.mid, PlayingPosition.SidePos.rightcentre));
      away_team.set_position(p16,new PlayingPosition (PlayingPosition.ForwardPos.defender, PlayingPosition.SidePos.rightcentre));
      away_team.set_position(p20,new PlayingPosition (PlayingPosition.ForwardPos.mid, PlayingPosition.SidePos.leftcentre));
      away_team.set_position(p24,new PlayingPosition (PlayingPosition.ForwardPos.keeper, PlayingPosition.SidePos.centre));
      away_team.set_position(p26,new PlayingPosition (PlayingPosition.ForwardPos.defender, PlayingPosition.SidePos.left));
    }

    catch (PlayerSelectionException e){
      e.printStackTrace();
      System.exit(1);
    }

    Game game = new Game (home_team, away_team);
    game.start();


  }

}
